bitkeeper revision 1.1385.1.4 (426f6b66K5Xrx0v2--zUfkahi8mIUw)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 27 Apr 2005 10:37:26 +0000 (10:37 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 27 Apr 2005 10:37:26 +0000 (10:37 +0000)
Invalidate p2m entries when blocks of phys memory are handed back to
Xen allocation pool. This is the correct fix for the "dom0 kernel
crashes when I create a domU" bug.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6.11-xen-sparse/arch/xen/i386/mm/hypervisor.c
linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/hypervisor.c

index 0c7738276b8cc80a918bd5b3333eedef8050fd45..16b253866ff24c2ace63c4a4c88eddcab0eea354 100644 (file)
@@ -211,7 +211,8 @@ unsigned long allocate_empty_lowmem_region(unsigned long pages)
         pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 
         pfn_array[i] = pte->pte_low >> PAGE_SHIFT;
         HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), __pte_ma(0), 0);
-        phys_to_machine_mapping[__pa(vstart)>>PAGE_SHIFT] = INVALID_P2M_ENTRY;
+        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
+            INVALID_P2M_ENTRY;
     }
 
     flush_tlb_all();
index ad04d3f1f2b71c0ab1a59dc1f5586d640c55773a..83a922954cbcd971d2f5d7b56644e87cccd281c1 100644 (file)
@@ -258,7 +258,8 @@ unsigned long allocate_empty_lowmem_region(unsigned long pages)
         pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 
         pfn_array[i] = pte->pte >> PAGE_SHIFT;
         xen_l1_entry_update(pte, 0);
-        phys_to_machine_mapping[__pa(vstart)>>PAGE_SHIFT] = (u32)INVALID_P2M_ENTRY;
+        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
+            (u32)INVALID_P2M_ENTRY;
     }
 
     /* Flush updates through and flush the TLB. */